package top.tocchen.bookshop.service.impl;

import top.tocchen.bookshop.dao.UserDao;
import top.tocchen.bookshop.entity.User;
import top.tocchen.bookshop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: tocchen
 * Date: 2021-05-12
 * Time: 18:34
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;
    @Override
    public int insertSelective(User record){
        return userDao.insertSelective(record);
    }

    @Override
    public User findByName(String name) {
        return userDao.findByName(name);
    }

    @Override
    public User findByNameAndPassword(User record) {
        return  userDao.findByNameAndPassword(record);
    }
}
